iterable  =  ['Spring',  'Summer',  'Autumn',  'Winter']
iterator = iter(iterable)
next(iterator)
next(iterator)
next(iterator)
next(iterator)

#But what happens when we reach the end?
next(iterator)


#A more practical example of the iteration protocols
def first(iterable):
    iterator = iter(iterable)
    try:
        return next(iterator)
    except StopIteration:
        raise ValueError("iterable is empty")

first(["1st",  "2nd",  "3rd"])
first({"1st",  "2nd",  "3rd"})#Note: a set is unordered, so 'first' is a little misleading
first(set())
